Software profiling is a technique for measuring resource consumption in computer systems by different software structures. A software profiling mechanism implemented in a computer system environment can collect and analyze data about various resources consumed by different software applications running in the computer system environment. For example, the various resources may include central processing unit (CPU) usage, memory allocations, input/output (IO) operations, number of method calls, etc. The software profiling mechanism, or the profiler, may collect resource consumption data for different parts of the running software applications, e.g., per software objects instantiated in the computer system environment, per separate methods or functions, etc. The profiling data can be used for different purposes, and is especially helpful for identifying inefficient programming structures.
A profiling mechanism may collect data and generate statistics about a quantity of a certain type of resource consumed by different parts of software applications. For example, a profiler may collect data and generate statistics about memory allocations for each method invoked within an application server runtime environment. In case of a relatively complex application server runtime environment, where profiling mechanisms are usually implemented, the number of invoked methods during a single profiler run may easily exceed several thousands. With such a big number, it is hard to identify inefficient methods, characterized with excessive resource consumption. Simple sorting of the methods, or of other investigated programming structures, based on their individual levels of resource consumption could be misleading, as the programming structures are often interrelated. The resource consumption of one programming structure could be a function from the resource consumption of another programming structure.